package com.princess.demok.ui.demo

import com.princess.baselib.utils.LogUtils
import com.princess.baselib.utils.setOnClickListenerWithTrigger
import com.princess.demok.R
import com.princess.demok.base.view.MyBaseActivity
import kotlinx.android.synthetic.main.activity_oppo_start.*

/**
 * @author: W9072388
 * @date: 2021/12/2
 * @Description:
 */
class OppoStartActivity : MyBaseActivity() {
    override fun getLayoutId(): Int = R.layout.activity_oppo_start

    override fun initOnCreate() {

    }

    override fun initOnClickerListener() {
        super.initOnClickerListener()

        btnOppoLogin.setOnClickListenerWithTrigger {
            startOppoLogin()
        }
    }

    private fun startOppoLogin() {
//        val request = OAuthRequest()
////设置您的AppID(开放平台创建应用时生成的)
//        request.setAppId("30692517")
////设置您创建的应用类型(APP,H5,FAST)
//        request.setAppType(OAuthConstants.AuthAppType.APP)
////设置您的请求Tag(可以为空)
//        request.setRequestTag("")
////设置您的授权Scope(openid,profile)
//        request.setScope(OAuthConstants.AuthScope.AUTH_SCOPE_PROFILE)
////设置您的授权显示界面类型(popup，page)
//        request.setDisplay(OAuthConstants.AuthShowType.AUTH_SHOW_TYPE_POPUP)
////设置您的授权prompt,prompt的详细介绍请参考表格----prompt字段介绍
//        request.setPrompt(OAuthConstants.Prompt.NONE)
////传入授权请求参数，调用授权API
//
//        OAuthSdk.requestOauthCode(request) {
//            val oAuthCodeResponse = it.response;
//            LogUtils.i("授权返回：" + JsonUtil.beanToJson(oAuthCodeResponse));
//        }
    }
}